#include "xict_common/log/log.h"

namespace xict_common {
    namespace log {
        const char* custom_verbosity_to_name(loguru::Verbosity verbosity) {
            switch (verbosity) {
            case loguru::Verbosity_1:
                return "DEBG";
            case loguru::Verbosity_2:
                return "TRCE";
            default:
                return nullptr;
            }
        }

        loguru::Verbosity custom_name_to_verbosity(const char* name) {
            if (strcmp(name, "DEBG") == 0) {
                return loguru::Verbosity_1;
            } else if (strcmp(name, "TRCE") == 0) {
                return loguru::Verbosity_2;
            } else {
                return loguru::Verbosity_INVALID;
            }
        }

    }   // namespace log
}   // namespace xict_common